<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>系统帮助页面实例管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript" src="${ctxStatic}/editor/nicEdit.js"></script>
	<script type="text/javascript">
		$(document).ready(function() {
			bkLib.onDomLoaded(function() { nicEditors.allTextAreas()});
			$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<nav data-role="navbar">
		<ul>
			<li><a href="${ctx}/help/systemHelp/">功能帮助列表</a></li>
			<li><a class="ui-btn-active" href="#">添加功能帮助</a></li>
		</ul>
	</nav>
	<form:form id="inputForm" modelAttribute="systemHelpOption" action="${ctx}/help/systemHelp/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<tags:message content="${message}"/>
		<div data-role="fieldcontain">
			<label for="type">类别:</label>
			<form:select path="type.id" items="${optionTypeMap}"></form:select>
		</div>
		<div data-role="fieldcontain">
			<label for="summary">描述:</label>
			<form:input id="summary" path="summary" htmlEscape="false" maxlength="50" class="required"/>
		</div>
		<label>详细步骤:</label>
			<form:textarea name="detail" path="detail" htmlEscape="false"/>
		<div class="icon-buttons">
			<input type="button"  data-inline="true" data-icon="back" data-iconpos="notext" value="返 回" onclick="history.go(-1)"/>
			<input type="submit" data-icon="check" data-iconpos="notext" value="保 存" data-inline="true"/>
		</div>
	</form:form>
</body>
</html>
